package model
{
	import mx.core.IUID;
	import mx.utils.UIDUtil;
	
	[Bindable]
	public class Song implements IUID
	{
		public var sid:int;
		public var userID:int;
		public var title:String;
		public var url:String;
		public var lyric:String;
		public var author:String;
		public var ratings:int = -1;
		public var update:String;
		public var coverUrl:String;
		private var _uid:String = null;
		
		public function Song(){
			this._uid = UIDUtil.createUID();
		}
		public function clone():Song{
			var song:Song = new Song();
			song.sid = this.sid;
			song.userID = this.userID;
			song.title = this.title;
			song.url = this.url;
			song.lyric = this.lyric;
			song.author = this.author;
			song.ratings = this.ratings;
			song.update = this.update;
			song.coverUrl = this.coverUrl;
			return song;
		}
		public function get uid():String {
            return _uid;
        }
        public function set uid(value:String):void {
            // Do nothing, the constructor created the uid.
        }
		
		
	}
}